Cost Planning and Estimation Using Pricing Calculator

Estimating the cost of the architecture or solution before deploying it on the cloud.

In the last section, we covered some important network services. We have covered all the 3 pillars of cloud computing. As you have learnt so many GCP services you should be able to estimate the cost of the services before you start implementing them. In this lesson, we will learn how to use the GCP pricing calculator and its benefit.

Introduction#

The “cost planning and estimation” is a crucial step of any cloud deployment cycle. Once you have a solution to the client or even for your own project you should no what could be the monthly cost or your architecture and how many months you can sustain if you are starting a new business.

Also, one cannot remember pricing for all the services. The calculator provides you with the right estimates by applying any discounts or free tier usage if available for that service.

Sample architecture#

To make this lesson more interesting, we will refer to the architecture for an ETL pipeline. ETL (Extract Transform and Load) pipelines are increasing day by day because of a lot of traditional companies moving towards cloud data warehouses for minimizing cost.

This architecture does not contain all the GCP services. And no solution or project will contain all the services. This architecture diagram is to give you the idea of how to calculate the solution cost for a certain time period.

Also, this architecture uses some extra services which we haven’t covered yet. But in the upcoming lessons, we will learn these services one by one. Services like “Cloud PubSub” are utility services but are very powerful and play a significant role in every decoupled architecture.

You can get the code for this architecture from the official Google Cloud repo.

Opinion analysis pipeline for data from forums like Reddit, Twitter or Hacker Noon.
Opinion analysis pipeline for data from forums like Reddit, Twitter or Hacker Noon.

Cost estimation#

Let’s try to estimate the cost of this architecture for a single run of the pipeline. This means, what will be the cost of analysis of a certain set of data. The services used in the architecture are:

  • App Engine
  • Cloud PubSub
  • BigQuery
  • Cloud Dataflow
  • Cloud Storage
  • Cloud SQL(Optional)

If we take data from cloud storage then cloud SQL is optional.

To calculate the estimates you should know the size and usage of the services for this task. Since you are estimating and haven’t run the pipeline yet we can provide the estimate based on the data. So let’s go to the pricing calculator.

You will see the list of services to select and a button at the end to add up your estimates. We will start with the first service.

Adding estimates#

Select us-east1 as location. You can select any other location as well but prices are low for this location.

  • App Engine: Search for “App Engine”. Add 1 instance per hour. Click on “Add to estimate”.

  • Cloud Storage: Search “Cloud Storage”. We will use a single region bucket. Add 2GB for data. Click on “Add to estimate”.

  • BigQuery: Use the same method to find BQ service. Since test data is small we will add 1 GB for storage and 100 MB for streaming inserts. Add it to estimate.

  • Dataflow (Batch Mode): The dataflow is used in 2 modes. Streaming and batch mode. So, let’s add estimates for those 2 modes. Search for “Dataflow”. For “Job Type”, select Batch. Select 1 - hour, 1 - node, n1-standard instance, and 100GB PD storage. Add to estimates.

  • Dataflow (Streaming Mode): For streaming mode, change job type to “Streaming”. Add to estimates with existing values.

You will see the total at the bottom on the right-hand side.

This is the cost for a single run. Don’t get confused by per month. Because if we run only one pipeline in the whole month, we will have this cost. This is very good to convince the customer saying they are paying less than a dollar for a single analysis.

Estimated Cost.

Sharing estimation#

You can share the estimates using email or URL. You will see the id parameter in the URL. That is unique to your calculator. Refer to this calculator which is the reference calculator for this lesson.

Exam tips#

For questions regarding the calculator in the exam, it is very simple. Once you see the words updated prices, latest prices, cost estimation, or questions like,

  • A customer wants to see the latest prices of the services to estimate the cost of the solution, which service will you use?

The answer will be the pricing calculator.

You can estimate the cost of different solutions from this GCP architectures website. Once you are done, move to the next section where we will look at the deployment of applications and some in detail management of some services.

Quiz

Cloud Functions